package br.com.usjt.locadoraweb.bean;

import java.io.IOException;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;

@ManagedBean(name="menuBean")
@RequestScoped
public class MenuBean {
	
	public void showVehicle() {
		redirect("ConsultVehicle.jsf");
	}
	
	public void showClientPF() {
		redirect("ConsultClientPF.jsf");
	}
	
	public void showClientPJ() {
		redirect("ConsultClientPJ.jsf");
		
	}
	
	public void redirect(String screen){
		try {
			FacesContext.getCurrentInstance().getExternalContext().redirect(screen);
		} catch (IOException ex) {
			ex.printStackTrace();
		}
	}

}
